package cn.edu.ctbu.studentmanage.controller;
import cn.edu.ctbu.studentmanage.domain.Course;
import cn.edu.ctbu.studentmanage.domain.Score;
import cn.edu.ctbu.studentmanage.service.CourseService;
import cn.edu.ctbu.studentmanage.service.ScoreService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@Controller
public class ScoreController {

    @Autowired
    private ScoreService scoreService;

    @RequestMapping("scoreindex")
    public String list(Model model){
        List<Score> scores = scoreService.findAll();
        model.addAttribute("data",scores);
        return "scoreindex";
    }

}